home *** CD-ROM | disk | FTP | other *** search
/ MacHack 1996 / MacHack 1996.toast / Hacks / Hacks ’93 / Mystery Science Mac / INIT sources / MSM.h < prev    next >
Encoding:
C/C++ Source or Header  |  1993-09-01  |  1.6 KB  |  76 lines  |  [TEXT/KAHL]

  1. #define NIL 0L
  2. #define debug 0
  3. #define FinalBuild 1
  4. #define R register
  5.  
  6. typedef long LongInt; /* in honor of MPW Pascal */
  7. typedef short INTEGER; /* in honor of MPW Pascal */
  8. typedef unsigned long TIME;
  9.  
  10.     /* C macros for Setting up and Restore'ing a4. */
  11.     #define SetUpA4()    { asm { move.l a4,-(sp) } asm { lea 'rga4',a4 } }
  12.     #define RestoreA4()    { asm { move.l (sp)+,a4 } }
  13.     
  14.     /* assembly macros, identical but can be done inside of asm {}'s. */
  15.     #define _SetUpA4    move.l a4,-(sp) \
  16.                         lea 'rga4',a4
  17.     #define _RestoreA4    move.l (sp)+,a4
  18.  
  19.     #pragma parameter __A0 CSetUpA4()
  20.     pascal void *CSetUpA4(void) = {0x2F0C, 0x49F9, 'rg', 'a4', 0x205F};
  21.  
  22.  
  23. extern    short keymapword : 0x17A;
  24.  
  25. typedef struct {
  26.     MenuHandle    menuOH;
  27.     int            menuLeft;
  28. } MenuRec;
  29. typedef struct MenuList {
  30.     int    lastMenu;
  31.     int    lastRight;
  32.     int    mbResID;
  33.         MenuRec    menus[1000];
  34. } **menulisthandle;
  35. extern    menulisthandle jbMenuList : 0xA1C;
  36.  
  37. enum {
  38.     modifier_mask = cmdKey + shiftKey + optionKey + controlKey
  39. };
  40.  
  41. typedef struct {    /* warning: this structure should not change form! */
  42.     short    trapNum;
  43.     long    oldAddress;
  44.     long    newAddress;
  45. } traps;
  46.  
  47. enum {
  48.     myMenuSelect = 0,
  49.     myDraw1Control,
  50.     myInitWindows,
  51.     myLast
  52. };
  53.  
  54. /* hImain.c */
  55.  
  56. void FixA4(Handle h);
  57. short SoundToPlay(void);
  58. void QueueSound(short snd);
  59.  
  60.  
  61. /* MSM.patches.c */
  62. extern    traps        Patches[];
  63. extern    CGrafPort    *MSMPort;
  64. extern    RgnHandle    gMysterious;
  65.  
  66. void FlushCache(void);
  67. void *real_address(void *jump_table_entry);
  68. void pJGNEfilter(short what, EventRecord *ep);
  69. pascal long pMenuSelect(Point pt);
  70. pascal void pDraw1Control(ControlHandle ch);
  71. pascal void pInitWindows(void);
  72.  
  73.  
  74. /* ShowINIT.c */
  75. pascal void ShowINIT(short iconID);
  76.